<%@ Page Trace="false" language="c#" Inherits="Dimok.Aspx.Manager.Application.Application_Image" EnableViewState="false" CodeFile="Application_Image.aspx.cs" %>
<%@ Register TagPrefix="Car" TagName="Info" Src="/Manager/Lib/Controls/CarInfo.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 

<html>
<head>
<TITLE>Application</TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
<LINK rel="stylesheet" type="text/css" href="/CSS/Outlook.css">
<LINK rel="stylesheet" type="text/css" href="../CSS/CSS.css">
<?XML:NAMESPACE PREFIX="DIMOK"/>
<?IMPORT namespace="DIMOK" implementation="/include/HTC/BlackBook/BlackBook.htc" >
<?IMPORT namespace="DIMOK" implementation="/include/HTC/ListBox/ListBox_VL.htc" >
<?IMPORT namespace="DIMOK" implementation="/include/HTC/SendToMenu.htc" >
<SCRIPT LANGUAGE="javascript" src="/Include/common.js"></SCRIPT>
<SCRIPT LANGUAGE="javascript" src="/Include/controls.js"></SCRIPT>
<SCRIPT LANGUAGE="javascript" src="/Include/RDS.js"></SCRIPT>
<SCRIPT LANGUAGE="javascript" src="/Include/SOAP.js"></SCRIPT>
<SCRIPT LANGUAGE="javascript" src="/Include/DB.js"></SCRIPT>
<SCRIPT LANGUAGE="javascript" src="/Include/XML.js"></SCRIPT>
<SCRIPT LANGUAGE="javascript" src="/Include/Events.js"></SCRIPT>
<SCRIPT LANGUAGE="javascript" src="../Common/Common.js"></SCRIPT>
<SCRIPT LANGUAGE="javascript" src="../Common/Events.js"></SCRIPT>
<SCRIPT LANGUAGE="javascript" src="Address.js"></SCRIPT>
<SCRIPT LANGUAGE="javascript" src="ApplInfo.js"></SCRIPT>
<SCRIPT LANGUAGE="javascript" src="CarInfo.js"></SCRIPT>
<SCRIPT>
function updateDealer(el){
	if( _selIndex() < 0 ){
	if( typeof(el.dataFld_Old) == "undefined" )return;
		el.dataFld = el.dataFld_Old;
		return alert('Please select a dealer from list.');
	}
	try{delete el.dataFld_Old;}catch(e){}
	doSelDealer();
	updateField_A(el,'DealerID',el.value?_sel().value:'');
}
function doFilterChange(){
	var el = event.srcElement;
	var dealerName = escape(event.filter.replace(/\s\(.{0,2}.*?$/,"").replace(/^\s+/,"").replace(/\s{2,}/g," "))
	cb.id = WS(cb,"GuessDealer",dealerName,true);
	return true;
	///Locals
	function cb(ret){
		if( ret.id != cb.id )return;
		if( showSOAPError(ret) )return;
		el.fillSelect(ret.value);
	}
}
function doFilterChange_LastName(){
	var el = event.srcElement;
	var name = escape(event.filter.replace(/^\s+/,"").replace(/\s{2,}/g," "))
	cb.id = WS(cb,"GuessLastName",name);
	return true;
	///Locals
	function cb(ret){
		if( showSOAPError(ret) )return;
		if( ret.id != cb.id )return;
		el.fillSelect(ret.value);
	}
}
</SCRIPT>
<STYLE>
.select { behavior:url(/include/HTC/select.htc);}
H1{ display:none }
.coolButton{
	BEHAVIOR:URL(/include/HTC/coolbutton_js.htc);
	cb--hover-border:black;
}
.bigList{behavior:URL(/include/htc/BigList.htc)}
</STYLE>
</HEAD>
<BODY onload="page_Load();try{txtDealer.focus()}catch(e){}" scroll="auto" style="VERTICAL-ALIGN: sub"
			style="OVERFLOW-X:hidden;OVERFLOW-Y:auto; FONT-WEIGHT: normal;FONT-SIZE: 8pt;FONT-FAMILY: Tahoma;BACKGROUND-COLOR: menu" bottomMargin="0" leftMargin="5" topMargin="5" rightMargin="0">
<!-- XML Datasources -->
<XML id="xmlApplInfo" Runat="server"></XML>
<XML id="xmlApplInfoCo"><ASP:LITERAL ID="ltrApplicantCo" Runat="server"></ASP:LITERAL></XML>
<XML id="xmlAddrInfo"><ASP:LITERAL ID="ltrAddresses" Runat="server"></ASP:LITERAL></XML>
<XML id="xmlEmplInfo"><ASP:LITERAL ID="ltrEmployments" Runat="server"></ASP:LITERAL></XML>
<XML id="xmlEmplInfoCo"><ASP:LITERAL ID="ltrEmploymentsCo" Runat="server"></ASP:LITERAL></XML>
<!-- End of XML Datasources -->
<TABLE>
	<TR>
		<TD nowrap onclick="showDealerList(selDealers)" class="cb"><DIV nowrap><B>Dealer Name</B></DIV></TD>
		<TD><SELECT onchange="selectSalesPerson(this)" datasrc="#xmlApplInfo" datafld="DealerID" id="selDealers" runat="server" NAME="selDealers"></SELECT></TD>
	<TR>
		<TD>Sales Person</TD><TD><SELECT id="selSalesPersons" wsMethod="XmlLoanInfo" datasrc="#xmlApplInfo" datafld="DealerSalesPersonID" runat="server" NAME="selSalesPersons"></SELECT></TD>
</TABLE>
<FIELDSET>
	<LEGEND>
		Personal [ID:<SPAN dataSrc="#xmlApplInfo" dataFld="ApplicantID"></SPAN>] 
	</LEGEND>
	<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
		<TR>
			<TD nowrap width="100%" colspan="2">
				<TEXTAREA style="WIDTH:100%;COLOR:crimson" dataSrc="#xmlApplInfo" dataFld="BuyerComments" tabindex="-1"></TEXTAREA>
			</TD>
		</TR>
		<!--tr>
			<td nowrap colspan="2">
				<span class="body">Home Phone:</span><br>
				<input id="txtHomePhone" dataSrc="#xmlApplInfo" dataFld="HomePhone">
			</td>
		</tr-->
		<TR>
			<TD nowrap colspan="2">
				<SPAN class="body">First Name:</SPAN><BR>
				<INPUT onfocus1="empList.show(aFName,txtLastName,aLName)" id="txtFirstName" dataSrc="#xmlApplInfo" dataFld="FirstName" tabindex="">
			</TD>
		</TR>
		<TR>
			<TD nowrap colspan="2">
				<SPAN class="body">Last Name:</SPAN><BR>
				<INPUT	id="txtLastName" dataSrc="#xmlApplInfo" dataFld="LastName"
								class="bigList" valueField="LastName" loose="true"
							 	noonchange="yes"
								onupdate="updateField(this,'LastName',this.Value||this.Text)"
								onfilterchange="doFilterChange_LastName(this)"
				>
			</TD>
		</TR>
		<TR>
			<TD nowrap class="body" width="1%">SSN:</TD>
			<TD nowrap>
				<INPUT id="txtSSN" preset="ssn" dataSrc="#xmlApplInfo" dataFld="SSN" maxlength="9" size="9">
			</TD>
		</TR>
		<TR>
			<TD>Zip:</TD>
			<TD><INPUT id="txtZip" class1="mask" preset="zip" dataSrc="#xmlApplInfo" dataFld="Zip" size="5" maxlength="5" onkeypress="onZipPress(this)" onchange="return true">
					<COOL:BUTTON onclick="getDTEC()" class="coolbutton" style="">DTEC</COOL:BUTTON>
			</TD>
		</TR>
		<TR style="display:none">
			<TD>DOB:</TD>
			<TD><INPUT disabled id="txtDOBMonth" dataSrc="#xmlApplInfo" dataFld="DOBMonth" style="width:15pt" MaxLength="2" tabindex1="-1">
				/
				<INPUT disabled id="txtDOBDay" dataSrc="#xmlApplInfo" dataFld="DOBDay" style="width:15pt" MaxLength="2" tabindex1="-1">
				/
				<INPUT disabled id="txtDOBYear" dataSrc="#xmlApplInfo" dataFld="DOBYear" size="3" MaxLength="4" tabindex1="-1">
			</TD>
		</TR>
	</TABLE>
</FIELDSET>
<FIELDSET style="WIDTH: 100%">
	<LEGEND style="CURSOR: hand; COLOR: darkslateblue; TEXT-ALIGN: center" align="left">
		<DIV align="center">Residence</DIV>
	</LEGEND>
	<TABLE id="tblAddres" dataSrc="#xmlAddrInfo" cellpadding="0" cellspacing="0" border="1">
		<THEAD>
			<TD>State</TD>
			<TD>Years</TD>
			<TD>Mos</TD>
		</THEAD>
		<TBODY>
			<TR id="trAddr">
				<TD>
					<H1><SPAN dataFld="ID"></SPAN></H1>
					<INPUT onchange="UpdateTable()" maxlength="2" size="2" dataFld="StateCode" id="txtStateCode" tabindex="-1">
				</TD>
				<TD>
					<INPUT onchange="UpdateTable()" onpropertychange="showAddrRow(this,'spnAddrTime')" maxlength="2" size="2" dataFld="Years" id="txtYears" class1="mask" preset="int" time="1">
				</TD>
				<TD>
					<INPUT onchange="UpdateTable()" onpropertychange="showAddrRow(this,'spnAddrTime')" maxlength="2" size="2" dataFld="Months" id="txtMonths" class1="mask" preset="month" time="1">
					<H1><SPAN id="spnAddrTime" dataFld="TimeLength"></SPAN></H1>
				</TD>
			</TR>
		</TBODY>
	</TABLE>
	Payment: <INPUT dataSrc="#xmlApplInfo" dataFld="HousePayment" size="4" MaxLength="4" class1="mask" preset="int" id="txtHousePmt">
	<SELECT datasrc="#xmlApplInfo" dataFld="HouseHoldTypeID" style="width:100%" id="selHouseHolds" runat="server"></SELECT>
</FIELDSET>
<FIELDSET style="WIDTH: 100%" id="fldEmployment">
	<LEGEND style="CURSOR: hand; COLOR: darkslateblue; TEXT-ALIGN: center" align="left">
		<DIV align="center">Employment</DIV>
	</LEGEND>
	<TABLE id="tblEmpl" dataSrc="#xmlEmplInfo" cellpadding="0" cellspacing="0">
		<THEAD><TD>Years</TD><TD>Mos</TD><td>Salary</TD></THEAD>
		<TBODY>
			<TR id="trEmpl" style="display:none">
				<TD>
					<H1><SPAN dataFld="ID"></SPAN><SPAN dataFld="Index"></SPAN></H1>
					<INPUT onchange="UpdateTable()" onpropertychange="showAddrRow(this,'spnEmplTime')" maxlength="2" size="2" dataFld="Years" id="txtEYears" class1="mask" preset="int" time="1">
				</TD>
				<TD>
					<INPUT onchange="UpdateTable()" onpropertychange="showAddrRow(this,'spnEmplTime')" maxlength="2" size="2" dataFld="Months" id="txtMonths" class1="mask" preset="month" time="1">
					<H1><SPAN id="spnEmplTime" dataFld="TimeLength"></SPAN></H1>
				</TD>
				<TD>
					<INPUT onchange="UpdateTable()" dataFld="Salary" size="4" onpropertychange="doSalary(this)" class1="mask" preset="int">
				</TD>
			</TR>
		</TBODY>
	</TABLE>
	<TABLE>
		<TR><TD>
			<FIELDSET>
				<LEGEND>Other Income:<INPUT dataSrc="#xmlApplInfo" dataFld="NonEmploymentIncome" class1="mask" preset="int" size="4" id=""></LEGEND>
				<TABLE width="100%"><TR><TD>
					<SELECT datasrc="#xmlApplInfo" dataFld="NonEmploymentIncomeDesc" style="width:100%" id="selUsableIncomes" runat="server"></SELECT>
				</TD></TR></TABLE>
			</FIELDSET>
		</TD></TR>
		<TR><TD>
			<FIELDSET>
				<LEGEND>2nd Incom:
				</LEGEND>
				<TABLE width="100%"><TR><TD>
					Y<INPUT dataSrc="#xmlEmplInfo" dataFld="Years" onchange="return UF(this,undefined,undefined,'xmlEmplInfo_1')" class1="mask" preset="int" style="width:15pt">
					M<INPUT dataSrc="#xmlApplInfo" dataFld="Months" onchange="return UF(this,undefined,undefined,'xmlEmplInfo_1')" class1="mask" preset="month" style="width:15pt">
					$<INPUT dataSrc="#xmlApplInfo" dataFld="Salary" onchange="return UF(this,undefined,undefined,'xmlEmplInfo_1')" size="2" onkeypress="doSalary(this)" class1="mask" preset="int">
					 <INPUT dataSrc="#xmlApplInfo" dataFld="Name" onchange="return UF(this,undefined,undefined,'xmlEmplInfo_1')" style="width:100%;heght:100%">
				</TD></TR></TABLE>
			</FIELDSET>
		</TD></TR>
	</TABLE>
</FIELDSET>
Cash Down:<INPUT dataSrc="#xmlApplInfo" dataFld="CashDown" size="4"><BR>
<INPUT type="checkbox" dataSrc="#xmlApplInfo" dataFld="PrevBankruptcy" value="1" onchange="updateField(this)" style="MARGIN-LEFT: 10px"> <SPAN>Previous Chapter 7</SPAN>
<CAR:INFO runat="server" />
<DIMOK:SENDMENU dir="F" onsend="pullCredit()" style="display:block">
	<ASP:LITERAL id="ltrWorkFlow_F" runat="server"></ASP:LITERAL>
</DIMOK:SENDMENU>
<DIMOK:SENDMENU dir="B" onsend="sendToMenu()" style="display:block">
	<ASP:LITERAL id="ltrWorkFlow_B" runat="server"></ASP:LITERAL>
</DIMOK:SENDMENU>
<HR>
<!-- ****************** Co-Applicant ******************* -->
<FIELDSET>
	<LEGEND>
		Co-X [ID:<SPAN dataSrc="#xmlApplInfoCo" dataFld="ApplicantID"></SPAN>]
		<INPUT type="button" id="btnRemCoAppl" onclick="remCoAppl()" value="Delete" tabindex="-1">
	</LEGEND>
	<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
		<TR>
			<TD nowrap colspan="2">
				<SPAN class="body">First Name:</SPAN><BR>
				<INPUT id="txtFirstName1" dataSrc="#xmlApplInfoCo" dataFld="FirstName" onafterupdate="reloadCoX()">
			</TD>
		</TR>
		<TR>
			<TD nowrap colspan="2">
				<SPAN class="body">Last Name:</SPAN><BR>
				<INPUT  id="txtLastName1" dataSrc="#xmlApplInfoCo" dataFld="LastName"
								class="bigList" valueField="LastName" loose="true"
							 	noonchange="yes"
								onupdate="updateField(this,'LastName',this.Value||this.Text)"
								onfilterchange="doFilterChange_LastName(this)"
				>
			</TD>
		</TR>
		<TR>
			<TD nowrap class="body" width="1%">SSN:</TD>
			<TD nowrap>
				<INPUT id="txtSSN" class1="mask" preset="ssn" dataSrc="#xmlApplInfoCo" dataFld="SSN" maxlength="9" size="9">
			</TD>
		</TR>
		<TR style="display:none">
			<TD>DOB:</TD>
			<TD><INPUT id="txtDOBMonth" dataSrc="#xmlApplInfoCo" dataFld="DOBMonth" style="width:15pt" MaxLength="2" tabindex1="-1">
				/
				<INPUT id="txtDOBDay" dataSrc="#xmlApplInfoCo" dataFld="DOBDay" style="width:15pt" MaxLength="2" tabindex1="-1">
				/
				<INPUT id="txtDOBYear" dataSrc="#xmlApplInfoCo" dataFld="DOBYear" size="3" MaxLength="4" tabindex1="-1">
			</TD>
		</TR>
	</TABLE>
</FIELDSET>
<FIELDSET style="WIDTH: 100%" id="fldEmployment1">
	<LEGEND style="CURSOR: hand; COLOR: darkslateblue; TEXT-ALIGN: center" align="left">
		<DIV align="center">Employment</DIV>
	</LEGEND>
	<TABLE id="tblEmpl" dataSrc="#xmlEmplInfoCo" cellpadding="0" cellspacing="0">
		<THEAD>
			<TD>Years</TD>
			<TD>Mos</TD>
			<TD>Salary</TD>
		</THEAD>
		<TBODY>
			<TR id="trEmpl1" style="display:none">
				<TD>
					<H1><SPAN dataFld="ID"></SPAN><SPAN dataFld="Index"></SPAN></H1>
					<INPUT onchange="UpdateTable()" onpropertychange="showAddrRow(this,'spnEmplTime1')" maxlength="2" size="2" dataFld="Years" id="txtEYears1" class1="mask" preset="int" time="1">
				</TD>
				<TD>
					<INPUT onchange="UpdateTable()" onpropertychange="showAddrRow(this,'spnEmplTime1')" maxlength="2" size="2" dataFld="Months" id="txtMonths" class1="mask" preset="month" time="1">
					<H1><SPAN id="spnEmplTime1" dataFld="TimeLength"></SPAN></H1>
				</TD>
				<TD>
					<INPUT onchange="UpdateTable()" dataFld="Salary" size="4" onpropertychange="doSalary(this)" class1="mask" preset="int">
				</TD>
			</TR>
		</TBODY>
	</TABLE>
	<TABLE>
		<TR><TD>
			<FIELDSET>
				<LEGEND>Other Income:<INPUT class1="mask" preset="int" dataSrc="#xmlApplInfoCo" dataFld="NonEmploymentIncome" size="4"></LEGEND>
				<TABLE width="100%"><TR><TD>
					<SELECT datasrc="#xmlApplInfoCo" dataFld="NonEmploymentIncome" style="width:100%" id="selUsableIncomesCo" runat="server"></SELECT>
				</TD></TR></TABLE>
			</FIELDSET>
		</TD></TR>
		<TR><TD>
			<FIELDSET>
				<LEGEND>2nd Incom:
				</LEGEND>
				<TABLE width="100%"><TR><TD>
					Y<INPUT class1="mask" preset="int" dataSrc="#xmlApplInfoCo" dataFld="Salary2Years" style="width:15pt">
					M<INPUT class1="mask" preset="month" dataSrc="#xmlApplInfoCo" dataFld="Salary2Months" style="width:15pt">
					$<INPUT class1="mask" preset="int" dataSrc="#xmlApplInfoCo" dataFld="Salary2" size="2" onkeypress="doSalary(this)">
					 <INPUT dataSrc="#xmlApplInfoCo" dataFld="Salary2Desc" style="width:100%">
				</TD></TR></TABLE>
			</FIELDSET>
		</TD></TR>
	</TABLE>
</FIELDSET>
<DIV id="el"></DIV>
<DIV id="sel"></DIV>
<COOL:EMPLOYMENT id="empList">
	<!--style="text-align:left;border:1px solid;cursor:hand;position:absolute;background-color:white"-->
</COOL:EMPLOYMENT>
</BODY>
</html>
<SCRIPT language="javascript">
function updatePromo(chk){
	if( !WS )return setTimeout(function(){updatePromo(chk)},300);
	var ret = WS(CO("UpdatePromo"),chk.promoID,chk.checked);
	if( showSOAPError(ret) )return false;
	for(var i=0; i < chkPromos.length; i++ )
		if( chkPromos[i] != chk )chkPromos[i].checked = false;
}
attachToDealerChanged(reloadMe);
function reloadMe(){
	location.reload();
}
</SCRIPT>
